﻿<ResourceDictionary
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:timeline="clr-namespace:TimelineLibrary;assembly=TimelineLibrary"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    mc:Ignorable="d">

    <timeline:NullToUnsetConverter
        x:Key="NullToUnsetConverter"></timeline:NullToUnsetConverter>

    <DataTemplate
        x:Key="TimelineEventStyle">
        <Grid
            x:Name="EventTemplateRoot"
            MinWidth="266">
            <Grid.ColumnDefinitions>
                <ColumnDefinition
                    Width="6" />
                <ColumnDefinition
                    Width="260" />
            </Grid.ColumnDefinitions>
            <Border
                Grid.Column="1"
                BorderThickness="1 1 1 1"
                Padding="0"
                Margin="2 2 2 2"
                BorderBrush="#FFC5CACE"
                CornerRadius="4">
                <Border.Effect>
                    <DropShadowEffect
                        Color="#FF706E6E" />
                </Border.Effect>
                <Border.Background>
                    <LinearGradientBrush
                        EndPoint="0.5,1"
                        StartPoint="0.5,0">
                        <GradientStop
                            Color="#FFD0D3D9"
                            Offset="0.01" />
                        <GradientStop
                            Color="#FF93979D"
                            Offset="1" />
                    </LinearGradientBrush>
                </Border.Background>
                <Border
                    BorderThickness="1"
                    CornerRadius="4"
                    Padding="2">
                    <Border.BorderBrush>
                        <LinearGradientBrush
                            EndPoint="0.5,1"
                            StartPoint="0.5,0">
                            <GradientStop
                                Color="#FFE0EEEE"
                                Offset="0" />
                            <GradientStop
                                Color="#FFB2B3B3"
                                Offset="1" />
                        </LinearGradientBrush>
                    </Border.BorderBrush>
                    <StackPanel
                        Margin="0"
                        Orientation="Vertical"
                        d:LayoutOverrides="HorizontalMargin">
                        <Image
                            x:Name="EventImage"
                            Source="{Binding Event.TeaserEventImage, Converter={StaticResource NullToUnsetConverter}, Mode=OneWay}"
                            Height="80"
                            Stretch="Uniform"
                            Margin="0" />
                        <StackPanel
                            Margin="0"
                            Orientation="Vertical"
                            Grid.Row="1">
                            <TextBlock
                                x:Name="EventTitleTextBlock"
                                Margin="0 3 0 0"
                                TextWrapping="Wrap"
                                Foreground="#FF353535"
                                FontFamily="Trebuchet MS"
                                FontWeight="Bold"
                                Text="{Binding Event.Title, Mode=OneWay}"
                                FontSize="12">
            					<TextBlock.Effect>
            						<DropShadowEffect
                                        Color="White"
                                        BlurRadius="2"
                                        Direction="274"
                                        ShadowDepth="1" />
            					</TextBlock.Effect>
                            </TextBlock>
                            <TextBlock
                                x:Name="EventTeaserBlock"
                                Margin="0 3 0 0"
                                TextWrapping="Wrap"
                                Foreground="#FF353535"
                                FontSize="10.667"
                                Text="{Binding Teaser, Mode=OneWay}"
                                FontFamily="Trebuchet MS"
                                FontStyle="Italic" />
                            <timeline:Hyperlink
                                x:Name="EventLinkTextBlock"
                                Margin="0 3 0 0"
                                Content="{Binding LinkText, Mode=OneWay}"
                                FontStyle="italic"
                                Foreground="Blue"
                                FontSize="9.25"/>
                        </StackPanel>
                    </StackPanel>
                </Border>
            </Border>
        </Grid>
    </DataTemplate>
</ResourceDictionary>